<template>
<div class="charts" ref="charts"></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  name: 'barChart' ,
   data () { 
      return {}
    },
    mounted() {
      let barChart = echarts.init(this.$refs.charts)
      barChart.setOption({
        xAxis: {
          show: false,
          type: 'category'
        },
        yAxis: {
          show: false,
        },
        // 图标距离网格的距离
        grid: {
          // show: true,
          top: 0,
          right: 0,
          bottom: 0,
          left: 0
        },
        tooltip: {},
        series: [
          {
            type: 'bar',
            data: [30, 35, 30, 15, 15, 50, 15, 50, 60, 35, 52, 75],
            color: 'orange'
          }
        ]
      })
    }

}
</script>

<style scoped>
.charts {
  width: 100%;
  height: 100%;
}
</style>
